package com.javalab._6feature._7io;

import java.io.Serializable;

public class MyObject implements Serializable {
    private String name;
    private int age;
    private Double weight;
    private Boolean sex;
    // 不序列化
    private transient Float salary;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Boolean getSex() {
        return sex;
    }

    public void setSex(Boolean sex) {
        this.sex = sex;
    }

    public Float getSalary() {
        return salary;
    }

    public void setSalary(Float salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "MyObject{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", weight=" + weight +
                ", sex=" + sex +
                ", salary=" + salary +
                '}';
    }
}
